﻿#ifndef MYTREEVIEW_H
#define MYTREEVIEW_H

#include <QTreeView>

//继承QTreeView重写点击消息，实现点空白处取消选择

class MyTreeView : public QTreeView
{
    Q_OBJECT
public:
    MyTreeView(QWidget *parent = Q_NULLPTR);



protected:
    void mousePressEvent ( QMouseEvent * event ) ;
    void mouseReleaseEvent(QMouseEvent *event) ;
    void mouseDoubleClickEvent(QMouseEvent *event) ;
    void mouseMoveEvent(QMouseEvent *event) ;
    void keyPressEvent(QKeyEvent *event) ;

};

#endif // MYTREEVIEW_H
